diff -Nuar a/autotests/libs/testrunner/setup.cpp b/autotests/libs/testrunner/setup.cpp
--- a/autotests/libs/testrunner/setup.cpp	2017-12-04 19:40:18.000000000 +0300
+++ b/autotests/libs/testrunner/setup.cpp	2017-12-16 12:43:17.517970333 +0300
@@ -309,7 +309,9 @@
     case Akonadi::ServerManager::NotRunning:
     case Akonadi::ServerManager::Broken:
         shutdownHarder();
+#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
         Q_FALLTHROUGH();
+#endif
     case Akonadi::ServerManager::Stopping:
         // safety timeout
         QTimer::singleShot(30 * 1000, this, &SetupTest::shutdownHarder);
diff -Nuar a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2017-12-08 04:01:14.000000000 +0300
+++ b/CMakeLists.txt	2017-12-16 12:43:59.721967288 +0300
@@ -29,7 +29,7 @@
 
 include(AkonadiMacros)
 
-set(QT_REQUIRED_VERSION "5.8.0")
+set(QT_REQUIRED_VERSION "5.7.1")
 set(AKONADI_VERSION ${PIM_VERSION})
 
 ecm_setup_version(PROJECT
diff -Nuar a/src/core/models/entitytreemodel.cpp b/src/core/models/entitytreemodel.cpp
--- a/src/core/models/entitytreemodel.cpp	2017-12-04 19:40:18.000000000 +0300
+++ b/src/core/models/entitytreemodel.cpp	2017-12-16 12:43:10.167970863 +0300
@@ -324,7 +324,9 @@
                 }
             }
             // fall through.
+#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
         Q_FALLTHROUGH();
+#endif
         }
         default:
             return entityData(collection, index.column(), role);
@@ -373,7 +375,9 @@
                 }
             }
             // fall through.
+#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
         Q_FALLTHROUGH();
+#endif
         }
         default:
             return entityData(item, index.column(), role);
